home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5311 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.agsm.ucla.edu!usenet
  2. From: ivo.welch@agsm.ucla.edu (Ivo Welch)
  3. Newsgroups: comp.sources.wanted,comp.lang.c
  4. Subject: Re: Seek C function to format dollars -- and more
  5. Date: 9 Feb 1996 21:54:07 GMT
  6. Organization: The Anderson School at UCLA
  7. Message-ID: <4fgfpv$p2d@risc.agsm.ucla.edu>
  8. References: <4feker$5bd@nuke.csu.net>
  9. NNTP-Posting-Host: next.agsm.ucla.edu
  10. In-Reply-To: <4feker$5bd@nuke.csu.net>
  11. X-Newsreader: NewsFlash [$Revision: 2.230 $] NF-U-00051
  12.  
  13.  
  14. >An improved version of printf with a %$
  15. >option would be especially terrific.
  16.  
  17. I also have some need to get more functionality from printf than what I can 
  18. decipher from the C manual.  In particular, I would like a %f option that 
  19. restricts the number of decimals after the period to a minimum.  So, if I 
  20. have
  21.     Float        Want-to-print
  22.     3.1400        3.14
  23.     3.1415        3.1415
  24.     3.0000        3
  25. Is there a way to add this functionality?
  26.  
  27. Please respond to me---I will post a summary.  (Our news server is flaky 
  28. enough to make reading newgroup a random affair.)
  29.  
  30. /ivo welch
  31. ---
  32. Ivo Welch            ivo.welch@anderson.ucla.edu
  33. Assoc Prof of Finance        Anderson GSM at UCLA
  34.     110 Westwood Plaza, Box 951481, LA CA 90095-1481
  35.  
  36. -- 
  37. Ivo Welch            ivo.welch@anderson.ucla.edu
  38. Assoc Prof of Finance        Anderson GSM at UCLA
  39.     110 Westwood Plaza, Box 951481, LA CA 90095-1481
  40.  
  41.